# coding: utf-8
# 文件名称: 反恐精英面向对象.py
# 创建时间: 2021/6/6 20:48

class People:

    def __init__(self, name):
        self.name = name
        self.blood = 100
        self.gun = None

    def an_zidan(self):
        print('安子弹')

    def an_danjia(self):
        print('安弹夹')

    def na_gun(self, gun_temp):
        self.gun = gun_temp
        print('拿枪')

    def kai_gun(self):
        print('开枪')

    def diaoxue(self, shashangli):
        self.ph -= shashangli

class Gun:

    def __init__(self, new_name):
        self.name = new_name
        self.danjia = None

    def lianjie_danjia(self, danjia_temp):
        self.danjia = danjia_temp
        print('连接弹夹')

    def sheji(self, diren):
        print('射击子弹')



class Danjia:

    def __init__(self, new_max_num):
        self.max_num = new_max_num
        self.zidan_list = []

    def baocun_zidan(self, zidan_temp):
        self.zidan_list.append(zidan_temp)
        print('保存子弹')

    def tanchu_zidan(self):
        print('弹出子弹')


class Zidan:

    def __init__(self, new_shashangli):
        self.shashangli = new_shashangli

    def shanghai(self, diren):
        print('让敌人掉血')